----------------------
-- 游戏初始化
----------------------
-- 类初始化
game        = class("game", bb.GameBase).new()
-- 日志标识
game.TAG    = "game"




-- 声音
sound         = require("com.sound")
-- 音效管理
soundEffect   = require("com.SoundEffect")
-- 语音管理
soundVoice    = require("com.SoundVoice")
-- umeng数据
umengOP       = require("com.UmengData")
tools       = require("com.Tools")


-- 配置表
require("com.DataConfig")
----------------------
-- 定义公共方法
----------------------
-- 自定义方法
function game:doSomething()

end





--加载视频广告按钮
function game:loadAdButton(parent)  
    -- 互推应用的key
    local recommendAppKeys = {}
    -- 是否是国际化版本
    local isInternationalization = false  

    -- if device.language == "zh" then
        if isios() then
            -- 宝宝巴士大全 宝宝巴士 宝宝爱整理 工程车 汉字家园
            recommendAppKeys = {
                "com.sinyee.babybus.recommandApp2",
                "com.sinyee.babybus.candy",
                "com.sinyee.babybus.shopping",
                "com.sinyee.babybus.food",
                "com.sinyee.babybus.homeland",
                "com.sinyee.babybus.numberwriter"
            }
        else
            -- 宝宝巴士大全 宝宝巴士 宝宝爱整理 工程车 汉字家园
            recommendAppKeys = {
                "com.sinyee.babybus.recommendapp",
                "com.sinyee.babybus.candy",
                "com.sinyee.babybus.shopping",
                "com.sinyee.babybus.food",
                "com.sinyee.babybus.homeland",
                "com.sinyee.babybus.numberwriter"
            }
        end
    -- else

    --     recommendAppKeys = {

    --     }
    -- end

    U.loadRecommend({
       isInternetional = isInternationalization, 
       appkeys    = recommendAppKeys,
       x          = -137.4,
       y          = 80*Y_FACTOR,
       delaX      = 200,
       delaY      = 0,
       videoAdPos = ccp(74, 480*Y_FACTOR),
       direction  = 1,
       addto      = parent
    })
    
    local videad = parent._videoAdsbtn
    return videad
end
